 /**
 * @(#) StartupCommand.as
 *
 * @date		2009. 02. 25.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	Application 시작을 처리하는 Command
 * 				 
 */
package com.skt.common_hr.teamprofile.controller
{
	
	import com.skt.common_hr.teamprofile.model.MemberSearchProxy;
	import com.skt.common_hr.teamprofile.model.OrgProxy;
	import com.skt.common_hr.teamprofile.model.ProfileDetailProxy;
	import com.skt.common_hr.teamprofile.model.ProfileProxy;
	import com.skt.common_hr.teamprofile.view.TeamViewMediator;
	
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand implements ICommand
	{
		
		override public function execute(note:INotification):void
		{
			var app:TeamProfile = note.getBody() as TeamProfile;
			trace("execute startupCommand in TeamProfile Module");
			
			facade.registerProxy(new OrgProxy());
			facade.registerProxy(new MemberSearchProxy());
			facade.registerProxy(new ProfileProxy());
			facade.registerProxy(new ProfileDetailProxy());
			
			// MVC 모델중 View와 관련한 mediator들을 등록한다.
			facade.registerMediator(new TeamViewMediator(app.view));
		}
	}
}